home *** CD-ROM | disk | FTP | other *** search
-
- /*
- File: CameraLibrary.h
-
- Contains: graphics libraries - perspective mapping generation routines
-
- Written by: Cary Clark, Georgiann Delaney, Michael Fairman, Dave Good, Robert Johnson, Keith McGreggor, Oliver Steele, David Van Brink, Chris Yerga
-
- Copyright: © 1995 by Apple Computer, Inc., all rights reserved.
-
- Change History (most recent first):
-
- <3> 4/7/95 jtd changed 'fract' to 'Fract'
- <2> 1/24/95 JD updated to latest GX 1.1 source (as of 16 Jan 1995)
- <1> 1/9/95 JD First checked in.
- */
-
- #ifndef __CAMERALIBRARY__
- #define __CAMERALIBRARY__
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- /* for compatibility with old headers */
- #define cameraLibraryIncludes
-
- #include <GXMath.h>
-
- struct point3D {
- Fixed x;
- Fixed y;
- Fixed z;
- };
- typedef struct point3D point3D;
-
- struct unit3D {
- Fract x;
- Fract y;
- Fract z;
- };
- typedef struct unit3D unit3D;
-
- struct camera {
- struct point3D location;
- struct point3D axis;
- struct point3D zenith;
- struct point3D observer;
- gxMapping orientation;
- };
- typedef struct camera camera;
-
- struct patch {
- struct point3D u;
- struct point3D v;
- struct point3D origin;
- };
- typedef struct patch patch;
-
- camera* InitCamera(camera *);
- camera* UpdateCamera(camera *);
- gxMapping* PatchToCameraMap(const patch *, const camera *, gxMapping *);
- Fixed Unitize(const point3D *, unit3D *);
- Fract FracDot(const unit3D *, const unit3D *);
- unit3D* FracCross(const unit3D *, const unit3D *, unit3D *cross);
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* __CAMERALIBRARY__ */
-